<?php
class ReciboGastoPago extends AppModel {
	var $name = 'ReciboGastoPago';
	var $useTable = 'recibos_gastos_pagos';
	var $validate = array(
		'id' => array(
			'blank' => array(
				'rule' => array('blank'),
				'on' => 'create' 
			)
		),
		'recibo_gasto_id' => array(
			'notEmpty' => array(
				'rule' => array('notEmpty')
			),
			'numeric' => array(
				'rule' => array('numeric')
			)
		),
		'tipo_pago_id' => array(
			'notEmpty' => array(
				'rule' => array('notEmpty')
			),
			'numeric' => array(
				'rule' => array('numeric')
			)
		),
		'numcheque' => array(
			'maxlength' => array(
				'rule' => array('maxLength', '100')
			)
		),
		'numdeposito' => array(
			'maxlength' => array(
				'rule' => array('maxLength', '100')
			)
		),
		'numreferencia' => array(
			'maxlength' => array(
				'rule' => array('maxLength', '100')
			)
		),
		'banco_id' => array(
			'numeric' => array(
				'rule' => array('numeric')
			)
		),
		'monto' => array(
			'decimal' => array(
				'rule' => array('decimal',2)
			),
			'notEmpty' => array(
				'rule' => array('notEmpty')
			)
		)
	);

	var $belongsTo = array(
		'ReciboGasto' => array(
			'className' => 'ReciboGasto',
			'foreignKey' => 'recibo_gasto_id'
		),
		'TipoPago' => array(
			'className' => 'TipoPago',
			'foreignKey' => 'tipo_pago_id'
		),
		'Banco' => array(
			'className' => 'Banco',
			'foreignKey' => 'banco_id'
		)
	);
}
?>